package com.ruoyi.personnel.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.personnel.mapper.EBankCardMapper;
import com.ruoyi.personnel.domain.EBankCard;
import com.ruoyi.personnel.service.IEBankCardService;

/**
 * 银行卡Service业务层处理
 *
 * @author ruoyi
 * @date 2024-11-25
 */
@Service
public class EBankCardServiceImpl extends ServiceImpl<EBankCardMapper,EBankCard> implements IEBankCardService
{
    @Autowired
    private EBankCardMapper eBankCardMapper;

    /**
     * 查询银行卡
     *
     * @param id 银行卡主键
     * @return 银行卡
     */
    @Override
    public EBankCard selectEBankCardById(Long id)
    {
        return eBankCardMapper.selectEBankCardById(id);
    }

    /**
     * 查询银行卡列表
     *
     * @param eBankCard 银行卡
     * @return 银行卡
     */
    @Override
    public List<EBankCard> selectEBankCardList(EBankCard eBankCard)
    {
        return eBankCardMapper.selectEBankCardList(eBankCard);
    }

    /**
     * 新增银行卡
     *
     * @param eBankCard 银行卡
     * @return 结果
     */
    @Override
    public int insertEBankCard(EBankCard eBankCard)
    {
        return eBankCardMapper.insertEBankCard(eBankCard);
    }

    /**
     * 修改银行卡
     *
     * @param eBankCard 银行卡
     * @return 结果
     */
    @Override
    public int updateEBankCard(EBankCard eBankCard)
    {
        return eBankCardMapper.updateEBankCard(eBankCard);
    }

    /**
     * 批量删除银行卡
     *
     * @param ids 需要删除的银行卡主键
     * @return 结果
     */
    @Override
    public int deleteEBankCardByIds(Long[] ids)
    {
        return eBankCardMapper.deleteEBankCardByIds(ids);
    }

    /**
     * 删除银行卡信息
     *
     * @param id 银行卡主键
     * @return 结果
     */
    @Override
    public int deleteEBankCardById(Long id)
    {
        return eBankCardMapper.deleteEBankCardById(id);
    }

    /*
    * 根据开户人姓名查询银行卡信息
    * */
    @Override
    public EBankCard selectEBankCardByAccountHolder(String accountHolder) {
        return eBankCardMapper.selectEBankCardByAccountHolder(accountHolder);
    }
}
